Package org.python.pydev.debug.newconsole.actions

Source Code of org.python.pydev.debug.newconsole.actions.DebugConsoleAction

package org.python.pydev.debug.newconsole.actions;

import org.eclipse.jface.action.IAction;
import org.eclipse.ui.console.ConsolePlugin;
import org.python.pydev.debug.model.PyStackFrame;
import org.python.pydev.debug.newconsole.PydevConsoleFactory;
import org.python.pydev.debug.newconsole.PydevDebugConsoleFrame;
import org.python.pydev.editor.actions.PyAction;

/**
* User can also launch pydev/debug console using Debug view context menu
*
* @author hussain.bohra
*/
public class DebugConsoleAction extends PyAction {

    // Initialize the console factory class
    private static final PydevConsoleFactory fFactory = new PydevConsoleFactory();

    public void run(IAction action) {
        try {
            PyStackFrame suspendedFrame = PydevDebugConsoleFrame.getCurrentSuspendedPyStackFrame();
            fFactory.createDebugConsole(suspendedFrame, null);
        } catch (Exception e) {
            ConsolePlugin.log(e);
        }
    }
}
TOP

Related Classes of org.python.pydev.debug.newconsole.actions.DebugConsoleAction

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.